package app;

import domain.Student;
import domain.Teacher;
import servcie.StudentTask;
import servcie.TeacherTask;

import java.util.ArrayList;
import java.util.Scanner;

public class StatisticalApp {
    public static ArrayList<Student> arrayList=new ArrayList<>();
    static Scanner scanner=new Scanner(System.in);
    static Teacher teacher=new Teacher("是个老师");
    public static void main(String[] args) {
        arrayList.add(new Student("刘备","001"));
        arrayList.add(new Student("张飞","002"));
        arrayList.add(new Student("关羽","003"));
        arrayList.add(new Student("曹操","004"));
        arrayList.add(new Student("曹仁","005"));
        arrayList.add(new Student("曹洪","006"));
        arrayList.add(new Student("孙策","007"));
        while (true){
            System.out.println("-----------欢迎来到任务统计系统-----------");
            System.out.println("角色:老师");
            System.out.println("角色:学生");
            System.out.println("退出系统:结束");
            System.out.println("请选择您的角色:");
            String select=scanner.next();
            switch (select){
                case "学生":
                    new StudentTask(teacher,arrayList,scanner).task();
                    break;
                case "老师":
                    new TeacherTask(teacher,arrayList,scanner).task();
                    break;
                case "结束":
                    System.exit(0);
                default:
                    System.out.println("乱输十八？扇你");
            }
        }
    }
}
